/*
 * @Author: your name
 * @Date: 2021-01-29 15:08:34
 * @LastEditTime: 2021-02-03 16:35:25
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \wechat-node\routes\company.js
 */
const router = require('koa-router')();
const {companiesModel} = require('../model/companies');
// 获取公司
router.get('/company', async (ctx, next) => {
    await companiesModel.getCompany(ctx);
});
// 增加公司
router.post('/add/company', async (ctx, next) => {
    await companiesModel.addCompany(ctx);
});
// 删除公司
router.post('/delete/company', async (ctx, next) => {
    await companiesModel.deleteCompanies(ctx);
});
// 编辑公司
router.post('/edit/company', async (ctx, next) => {
    await companiesModel.editCompany(ctx);
});
// 查询当前公司信息
router.get('/company/info', async (ctx, next) => {
    await companiesModel.companyInfo(ctx);
});
module.exports = router;